<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="oastaglib" prefix="oas"%>
<html>
<head>
    <title>Online Attendance System</title>
    
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/bootstrap/dist/css/bootstrap.min.css" /> ">
    <script type="text/javascript" src="<c:url value="/resources/js/jquery/dist/jquery.min.js"/>"></script>
    <script type="text/javascript" src="<c:url value="/resources/bootstrap/dist/js/bootstrap.min.js"/>"></script>
</head>
<body style="background-color:#eeeeee">
<oas:nav></oas:nav>

<oas:content>
<div style="background-color:#ffffff; width:90%; margin:0 auto; padding:15px 10px;">
    历史请假页面
    <a href="<c:url value="/leave" />">返回</a>
    <br/>
    <c:forEach items="${paginationSupport.items }" var="leave">
		请假原因:${leave.type.description}<br/>
    	申请时间:<fmt:formatDate value="${leave.applyDate}"
    							pattern="yyyy-MM-dd HH:mm:ss" /><br/>
    	状态:						
    	<c:if test="${leave.status == 0}">  
    		待审核
    	</c:if>  
    	<c:if test="${leave.status == 1}">  
    		已通过
    	</c:if> 
    	<c:if test="${leave.status == 2}">  
    		未通过
    	</c:if> <br/>
    	<a href="<c:url value="/leave/history/${leave.id}" />">查看详情</a>
    	<br/>
		<hr/>
    </c:forEach>
	<br/>
	每页${paginationSupport.pageSize}条记录， 第${paginationSupport.currentPageNo}/${paginationSupport.totalPageCount}页,共${paginationSupport.totalCount}条记录
    <c:if test="${paginationSupport.previousPage }">
    	<a href="<c:url value="/attendances/history?pageNo=${paginationSupport.currentPageNo-1}"/>">上一页</a>
    </c:if>
    
    <c:if test="${paginationSupport.nextPage }">
    	<a href="<c:url value="/attendances/history?pageNo=${paginationSupport.currentPageNo+1}"/>">下一页</a>
    </c:if>
</div>    
</oas:content>
<oas:footer></oas:footer>    
</body>
</html>
